import request from '@/utils/request'

// 查询现场应急处置卡
export function listEmergency(query) {
  return request({
    url: '/emergency/emergency/list',
    method: 'get',
    params: query
  })
}
// 查询现场应急处置卡详细
export function getEmergency(id) {
  return request({
    url: '/emergency/emergency/' + id,
    method: 'get'
  })
}

// 导出现场应急处置卡数据
export function exportEmergency(query) {
  return request({
    url: '/emergency/emergency/export',
    method: 'post',
    data: query,  
    responseType: 'blob'
  })
}

// 新增现场应急处置卡
export function addEmergency(data) {
  
  return request({
    url: '/emergency/emergency',
    method: 'post',
    data: data
  })
}


// 修改现场应急处置卡
export function updateEmergency(data) {
  return request({
    url: '/emergency/emergency',
    method: 'put',
    data: data
  })
}

// 删除现场应急处置卡
export function delEmergency(id) {
  return request({
    url: '/emergency/emergency/' + id,
    method: 'delete'
  })
}